<template>
	<view class="page" :style="{minHeight:$height()}">
		<view class="content">
			<u-parse :html="article.content" ></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				article:{}
			}
		},
		onLoad(options) {
			this.id = options.id
		},
		onShow() {
			this.getArticle()
		},
		methods: {
			getArticle(index) {
				this.$axios.request(`${this.$api.getNews}/${this.id}`,"GET").then((val)=>{
					this.article = val.data
					uni.setNavigationBarTitle({
						title:val.data.title
					})
				})
			}
		}
	}
</script>

<style>
	.page {
		width: 100%;
		/* background-color: #F0F2F5; */
	}

	.content {
		width: 100%;
		height: 100%;
		padding: 29rpx 32rpx 29rpx;
		line-height: 50rpx;
		margin: 0 0 12rpx;
		background-color: #fff;
		font-size: 26rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		overflow-y: auto;
		opacity: 1;
	}

	.titleBox {
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.massge {
		font-size: 20rpx;
		font-family: "PingFang SC";
		font-weight: 300;
		color: #666666;
		margin: 14rpx 0 0;
		text-align: center;
		opacity: 1;
	}
	.item {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		align-items: center;
		width: 685rpx;
		height: 640rpx;
		margin: 70rpx auto 0 ;
	}
	.iamgBox {
		width: 324rpx;
		height: 304rpx;
		border: 2rpx dotted #333;
	}
</style>
